package mode.observer.code;

/**
 * 观察者测试
 *
 * @author xjx
 * @date 2023/7/27 14:35
 */
public class MainTest {
    public static void main(String[] args) {
        Observable o = new Subject();
        WeixinUser user1 = new WeixinUser("张三");
        WeixinUser user2 = new WeixinUser("李四");
        WeixinUser user3 = new WeixinUser("王五");
        o.add(user1);
        o.add(user2);
        o.add(user3);
        o.notify("薛之谦演唱会要来到广州啦!");
    }
}
